<?php
declare(strict_types=1);

namespace App\Resource\Group\Party;


use Illuminate\Http\Resources\Json\JsonResource;

class ReplyListResource extends JsonResource
{
    public function toArray($request)
    {
        if(empty($this->id)){
            return [];
        }

        return [
            "id" => $this->id,
            "score" => $this->score,
            "user" => UserResource::make($this->user)
        ];
    }
}